import { request } from "../utils/index.js"


export default {
    //修改排片
    modification:(rseult)=>request({
        type:'patch',
        url:`/api/schedules/xiuGaiPaiPian`,
        data:rseult
    }),
    // 删除排片
    delesched:(data)=>request({
        type:'delete',
        url:`/api/schedules/deletePaipian`,
        data:data
    }),
    //通过  /schedules 页面传过来的id 查询 排片数据库
    queryPaipian:({_id})=>request({
        type:'get',
        url:`/api/schedules/examine/${_id}`,
    }),


    // 通过 影院id 获取 放映厅
    gettheaters:({cinemasId})=>request({
        type:'get',
        url:'/api/schedules/gettheaters',
        data:{cinemasId}
    }),

    permutation:(result)=>request({
        type:'post',    
        url:'/api/schedules/addData',
        data:result
    }),
    // 排片表格获取电影数据
    getmovies:({ curpage, eachpage })=>request({
        type:'get',
        url:'/api/schedules/getmovies',
        data:{ curpage, eachpage },
    }),
    
    sche: () => request({
        type:'get',
        url:'/api/schedules/getSchedules',
    }),
}
